import request from '@/utils/request';
import { stringify } from 'qs';
export default {
    shirologin(payload) {
        return request({
            url: `/api/mall/shirologin?${stringify(payload)}`,
            method: 'post',
        })
    },
    validateCode(){
        return request({
            url: `/api/mall/validateCode`,
        })
    },
    DetailById(payload) {
        return request({
            url: `/api/mall/DetailById?${stringify(payload)}`,
            method: 'get',
        })
    },
    userRegister(payload) {
        return request({
            url: `/api/mall/userRegister`,
            method: 'post',
            data: payload
        })
    },
    getCartCount(payload) {
        return request({
            url: `/api/getCartCount?${stringify(payload)}`,
            method: 'get'
        })
    },
    getMessageCount(payload) {
        return request({
            url: `/api/mes/getMessageCount?${stringify(payload)}`,
            method: 'get'
        })
    },
    OrderCount(payload) {
        return request({
            url: `/api/personal/OrderCount?${stringify(payload)}`,
            method: 'get'
        })
    },
    recharge(payload) {
        return request({
            url: `/api/personal/recharge?${stringify(payload)}`,
            method: 'post'
        })
    },
    cash(payload) {
        return request({
            url: `/api/personal/cash?${stringify(payload)}`,
            method: 'post'
        })
    },
    actMessages(payload) {
        return request({
            url: `/api/personal/actMessages?${stringify(payload)}`,
            method: 'get'
        })
    },
    getDetail(payload) {
        return request({
            url: `/api/personal/getDetail?${stringify(payload)}`,
            method: 'get'
        })
    },
    doReal(payload){
        return request({
            url: `/api/doReal`,
            method: 'put',
            data: payload
        })
    },
    openShop(payload){
        return request({
            url: `/api/openShop?user_shop=${payload.user_shop}&user_id=${payload.user_id}&shop_name=${payload.shop_name}`,
            method: 'post',
        })
    },
    checkUser(payload){
        return request({
            url: `/api/mall/checkUser?${stringify(payload)}`,
            method: 'get',
        })
    },
    updatePassword(payload){
        return request({
            url: `/api/mall/updatePassword?${stringify(payload)}`,
            method: 'post',
        })
    }
}